package com.common.retrofit.methods;

import com.common.retrofit.base.BaseMethods;
import com.common.retrofit.entity.result.HtmlBean;
import com.common.retrofit.service.HaiNingService;

import java.util.List;

import rx.Observable;
import rx.Subscriber;

public class GetUrlMethods extends BaseMethods {

    private static GetUrlMethods m_ins = null;

    public static GetUrlMethods getInstance() {
        if (m_ins == null) {
            synchronized (GetUrlMethods.class) {
                if (m_ins == null) {
                    m_ins = new GetUrlMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "Other/";
    }

    private HaiNingService initService() {
        return getRetrofit().create(HaiNingService.class);
    }


    public void get_h5_url(Subscriber<HtmlBean> subscriber
                      ) {
        Observable observable = initService().get_h5_url(System.currentTimeMillis()+"",
                "70ffcb2a3569065c4420776b8a81809b"
        );
        toSubscribe(observable, subscriber);
    }
}
